package org.minbox.framework.microservice.openfeign;

import org.minbox.framework.microservice.common.entity.GoodInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 商品服务OpenFeign接口定义
 *
 * @author 恒宇少年
 */
@FeignClient(name = "good-service")
@RequestMapping(value = "/good")
public interface GoodServiceClient {
    /**
     * 查询商品基本信息
     *
     * @param goodId 商品编号 {@link GoodInfo#getId()}
     * @return {@link GoodInfo}
     */
    @GetMapping(value = "/{goodId}")
    GoodInfo findById(@PathVariable Integer goodId);
}
